﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;

namespace BUS
{
    public class SanPhamBUS
    {
        public static SanPhamDTO LaySanPhamTheoID(int id)
        {
            return SanPhamDAO.LaySanPhamTheoID(id);
        }
       
        public static List<SanPhamDTO> LaySanPhamTheoTenSanPham(string tensanpham)
        {
            return SanPhamDAO.LaySanPhamTheoTenSanPham(tensanpham);
        }

        public static SanPhamDTO LaySanPhamTheoTenSanPham1(string tensanpham)
        {
            return SanPhamDAO.LaySanPhamTheoTenSanPham1(tensanpham);
        }
        public static List<SanPhamDTO> TraCuuSanPhamCoChuaTenSanPham(string tensanpham, int giatu, int giaden, string tenhangsanxuat)
        {
            return SanPhamDAO.TraCuuSanPhamCoChuaTenSanPham(tensanpham, giatu, giaden, tenhangsanxuat);
        }

        public static List<SanPhamDTO> TraCuuSanPhamKhongChuaTenSanPham(int giatu, int giaden, string tenhangsanxuat)
        {
            return SanPhamDAO.TraCuuSanPhamKhongChuaTenSanPham(giatu, giaden, tenhangsanxuat);
        }


        public static List<SanPhamDTO> LayDanhSachSanPhamTheoMaDanhMucSanPham(int madanhmucsanpham)
        {
            return SanPhamDAO.LayDanhSachSanPhamTheoMaDanhMucSanPham(madanhmucsanpham);
        }

        public static List<SanPhamDTO> LayDanhSachNhomDanhMucSanPham(int manhomdanhmucsanpham)
        {
            return SanPhamDAO.LayDanhSachSanPhamTheoNhomDanhMucSanPham(manhomdanhmucsanpham);
        }

        public static List<SanPhamDTO> LayDanhSachSanPhamTheoMahangSanXuat(int mahangsanxuat)
        {
            return SanPhamDAO.LayDanhSachSanPhamTheoMaHangSanXuat(mahangsanxuat);
        }

        public static bool KiemTraSanPhamLaLapTop(int id)
        {
            return SanPhamDAO.KiemTraSanPhamLaLapTop(id);
        }

        public static List<SanPhamDTO> LayDanhSachSanPham()
        {
            return SanPhamDAO.LayDanhSachSanPham();
        }

        public static int DemSoLuongSanPham()
        {
            return SanPhamDAO.DemSoLuongSanPham();
        }

        public static List<SanPhamDTO> LayDanhSachSanPhamBoQuaNSanPham(int n)
        {
            return SanPhamDAO.LayDanhSachSanPhamBoQuaNSanPham(n);
        }

        public static bool CapNhatSanPham(SanPhamDTO sanphamDTO)
        {
            return SanPhamDAO.CapNhatSanPham(sanphamDTO);
        }

        public static bool XoaSanPhamTheoID(int id)
        {
            return SanPhamDAO.XoaSanPhamTheoID(id);
        }
    }
}
